package com.sam.mvp.entity;

import com.jess.arms.utils.ArmsUtils;
import com.sam.base.MutiTypeTitleEntity;

/**
 * @ProjectName: SamLib
 * @Package: com.sam.mvp.entity
 * @ClassName: HomeEnity
 * @Description:
 * @Author: Carl
 * @CreateDate: 2018/10/24 11:24
 * @UpdateUser:
 * @UpdateDate: 2018/10/24 11:24
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
public class HomeEnity implements MutiTypeTitleEntity {

    public static final int TOP = 1;
    public static final int CENTER = 2;
    public static final int BOTTOM = 3;

    public static final String TOP_HEAD_TITLE = "我是顶部头部标题";
    public static final String TOP_FOOTER_TITLE = "查看更多点我吧";

    public static final String CENTER_HEAD_TITLE = "我是中间头部标题";
    public static final String CENTER_FOOTER_TITLE = "我是中间脚部标题";

    public static final String BOTTOM_HEAD_TITLE = "我是底部头部标题";
    public static final String BOTTOM_FOOTER_TITLE = "我是底部脚部标题";

    private String title;
    private int type;
    private long id;


    public HomeEnity(String title, int type) {
        this.title = title;
        this.type = type;
    }

    public HomeEnity() {
    }

    @Override
    public String getTitle() {
        return title;
    }

    @Override
    public void setTitle(String title) {
        this.title = title;
    }

    @Override
    public int getItemType() {
        return type;
    }

    @Override
    public long getId() {
        return ArmsUtils.encodeToMD5(title).hashCode();
    }
}
